<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>

<head>
		<meta charset="utf-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<meta name="viewport" content="width=device-width, initial-scale=1">
		<title>用户综合管理 - 学生宿舍管理系统</title>
		<link rel="shortcut icon" href="img/head.png" type="image/x-icon">
		<meta name="renderer" content="webkit">
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="format-detection" content="telephone=no">
		<link rel="stylesheet" href="volunteer/admin/css/layui/css/layui.css" media="all">
		<link rel="stylesheet" href="volunteer/admin/css/biaoge.css">
		<link rel="stylesheet" href="volunteer/admin/css/quyu.css">
		<script type="text/javascript" src="js/xadmin.js"></script>
		<script src="volunteer/admin/css/layui/layui.js" charset="utf-8"></script>
		<style>
		.box1 {
		    text-align: center;
		    width: 100%;
		    margin-top: 10px;
		}
		h3 {
		    text-align: center;
		    font-size: 25px;
		    color: aliceblue;
		    font-family: 华文楷体;
		}
		     </style>
</head>
<body>
		<c:set var="List" value="${requestScope.List.subList(Page.beginIndex,Page.endIndex)}"/>
		<div class="layui-layout layui-layout-admin">
			<div class="layui-header">
				<div class="layui-logo" style="width: 300px;"><h3 >“东软”志愿者管理系统</h3></div>
				<!-- 头部区域（可配合layui 已有的水平导航） -->
				<div class="left_open">
					<a><i class="layui-icon">&#xe668;</i></a>
				</div>
				<ul class="layui-nav layui-layout-right">
					<li class="layui-nav-item">
						<a href="javascript:;">
							<img src="volunteer/img/13.jpg" class="layui-nav-img">
							院级管理员
						</a>
						<dl class="layui-nav-child">
							<dd><a href="">切换账号</a></dd>
							<dd><a href="volunteer/Login&Register.jsp">退出</a></dd>
						</dl>
					</li>
					<li class="layui-nav-item"><a href="">前台首页</a></li>
				</ul>
			</div>

			<div class="layui-side layui-bg-black">
				<div class="layui-side-scroll">
                    <div class="box1">
                        <img src="volunteer/img/13.jpg" alt="">
                    </div>
					<!-- 左侧导航区域（可配合layui已有的垂直导航） -->
					<ul class="layui-nav layui-nav-tree" lay-filter="test">
                        
						<li class="layui-nav-item"><a href="volunteer/admin/home.jsp"><i class="layui-icon">&#xe68e;</i>&nbsp;&nbsp;主页</a></li>
						<li class="layui-nav-item layui-nav-itemed">
							<a href="javascript:;"><i class="layui-icon">&#xe66f;</i>&nbsp;&nbsp;志愿者管理</a>
							<dl class="layui-nav-child">
								<dd class="layui-this"><a href="Volunteer">志愿者列表</a></dd>
								<dd><a href="volunteer/admin/detail.jsp">志愿者详情</a></dd>
                                <dd><a href="Examine">志愿者审批</a></dd>
                                <dd><a href="Blist">黑名单</a></dd>
							</dl>
						</li>
						<li class="layui-nav-item">
							<a href="javascript:;"><i class="layui-icon">&#xe653;</i>&nbsp;&nbsp;活动管理</a>
							<dl class="layui-nav-child">
								<dd><a href="News">新闻管理</a></dd>
								<dd><a href="Notice">志愿活动</a></dd>
							</dl>
						</li>
						<li class="layui-nav-item">
							<a href="javascript:;"><i class="layui-icon">&#xe67a;</i>&nbsp;&nbsp;物资管理</a>
							<dl class="layui-nav-child">
								<dd><a href="3-1.html">物资管理</a></dd>
								<dd><a href="3-2.html">物资管理</a></dd>
								<dd><a href="3-3.html">物资管理</a></dd>
								<dd><a href="3-4.html">物资管理</a></dd>
							</dl>
						</li>
						<li class="layui-nav-item"><a href="7-1.html"><i class="layui-icon">&#xe60b;</i>&nbsp;&nbsp;个人中心</a></li>
					</ul>
				</div>
			</div>

			<div class="layui-body" style="bottom: 0px;">
                <ol class="breadcrumb">
                    <li><a href="#">主页</a></li>
                    <li class="active">志愿者列表</li>
                </ol>
				<!-- 内容主体区域 -->
                <div style="margin: 20px;  background-color: #F6F6F6;">
                    <div style="padding: 10px;padding-top: 10px; padding-bottom: 5px;">

                        <div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief" style="margin-top: 0px;">
                            <!-- <ul class="layui-tab-title">
                                <li class="layui-this">新增用户</li>
                                <li>删除用户</li>
                                <li>修改用户信息</li>
                            </ul> -->
                            <div class="layui-tab-content">
                                <div class="layui-tab-item layui-show">
                                    <input class="input" placeholder="请输入志愿者的姓名" type="search" name="googlesearch">
                                    <!-- <button type="button" class="btn btn-primary btn-sm">查询</button> -->
                                    <button class="layui-btn box7"  lay-submit="" lay-filter="sreach"><i class="layui-icon">&#xe615;</i></button>
                                    <table align="center"  class="table table-striped  table-hover table-condensed table-responsive">
                                        <thead>
                                            <tr style="background-color: #5687dc; color: #fff; ">
                                                <th style="vertical-align: middle;">编号</th>
                                                <th style="vertical-align: middle; width: 10%;" >用户名</th>
                                                <th style="vertical-align: middle;">密码</th>
                                                <th style="vertical-align: middle; width: 13%;" >头像</th>
                                                <th style="vertical-align: middle; ">性别</th>
                                                <th style="vertical-align: middle;">电话</th>
                                                <th style="vertical-align: middle;">学院</th>
                                                <th style="vertical-align: middle;" width="17%">操作</th>
                                            </tr>
                                        </thead>
                                        <tbody class="table1">
                                        	<c:forEach items="${List}" var="a" varStatus="st">
	                                            <tr >
	                                                <td>${st.index+1+Page.beginIndex}</td>
	                                                <td>${a.username}</td>
	                                                <td>******</td>
	                                                <td><img src="volunteer/${a.pricture}" width="100px" height="100px"></td>
	                                                <td>${a.sex== 1?"男":"女"}</td>
	                                                <td>${a.tel}</td>
	                                                <td>${a.uclass}</td>
	                                                <input id="username${st.index}" type="hidden" name="username" value="${a.username}">
	                                                <input id="id${st.index}" type="hidden" name="id" value="${a.id}">
	                                                <td><a href="/Volunteer/UpdateVolunteer?id=${a.id}"><button type="button" class="layui-btn layui-btn-normal">重置密码</button></a>
	                                                    <a onclick="return check(${st.index})"><button type="button" class="layui-btn layui-btn-danger">禁封</button></a></td>
	                                                
	                                            </tr>
                                            </c:forEach>
<!--                                             <tr> -->
<!--                                                 <td>2</td> -->
<!--                                                 <td>杨广人</td> -->
<!--                                                 <td><img src="img/3.jpg" width="100px" height="100px"></td> -->
<!--                                                 <td>男</td> -->
<!--                                                 <td>1234567822</td> -->
<!--                                                 <td>123456@qq.com</td> -->
<!--                                                 <td><button type="button" class="layui-btn layui-btn-normal">重置密码</button> -->
<!--                                                     <button type="button" class="layui-btn layui-btn-danger">禁封</button></td> -->
                                                
<!--                                             </tr> -->
<!--                                             <tr> -->
<!--                                                 <td>3</td> -->
<!--                                                 <td>诸葛明</td> -->
<!--                                                 <td><img src="img/4.jpg" width="100px" height="100px"></td> -->
<!--                                                 <td>男</td> -->
<!--                                                 <td>1234567822</td> -->
<!--                                                 <td>123456@qq.com</td> -->
<!--                                                 <td><button type="button" class="layui-btn layui-btn-normal">重置密码</button> -->
<!--                                                     <button type="button" class="layui-btn layui-btn-danger">禁封</button></td> -->
                                                
<!--                                             </tr> -->
<!--                                             <tr> -->
<!--                                                 <td>4</td> -->
<!--                                                 <td>李明</td> -->
<!--                                                 <td><img src="img/5.jpg" width="100px" height="100px"></td> -->
<!--                                                 <td>男</td> -->
<!--                                                 <td>1234567822</td> -->
<!--                                                 <td>123456@qq.com</td> -->
<!--                                                 <td><button type="button" class="layui-btn layui-btn-normal">重置密码</button> -->
<!--                                                     <button type="button" class="layui-btn layui-btn-danger">禁封</button></td> -->
                                                
<!--                                             </tr> -->
                                        </tbody>
                                    </table>

                                    <div class="footer">
			                             <ul class="pagination">
							                <li><a href="<c:url value="?page=1"/>">首页</a></li>
							                <li><a href="<c:url value="?page=${Page.page-1>1?Page.page-1:1}"/>">&laquo;</a></li>
							 
							                <c:forEach begin="1" end="${Page.toall}" varStatus="loop">
							                    <c:set var="active" value="${loop.index==Page.page?'active':''}"/>
							                    <li class="${active}"><a
							                            href="<c:url value="?page=${loop.index}"/>">${loop.index}</a>
							                    </li>
							                </c:forEach>
							                <li>
							                    <a href="<c:url value="?page=${Page.page+1<Page.toall?Page.page+1:Page.toall}"/>">&raquo;</a>
							                </li>
							                <li><a href="<c:url value="?page=${Page.toall}"/>">尾页</a></li>
							            </ul>
                                    </div>
                                </div>
    
                            </div>
                            
                        </div>
    
                    </div>
                </div>

			</div>


		</div>

		<script>
			//JavaScript 代码区域
			layui.use('element', function() {
				var element = layui.element;

			});
// 			layui.use(['layer', 'form'], function check(st){
// 				  var layer = layui.layer
// 				  ,form = layui.form;
// 				  var a = document.getElementById("username"+st).value; 
// 				  var z=layer.alert("确定要禁封'"+a+"'吗?")
// 				  if(z){
// 					layer.alert("禁封成功！");
// 				    return true;
// 				  }else{
// 				    return false;
// 				  }
// 			});
			function check(st){
// 				  var a = document.getElementById("username"+st).value; 
// 				  var z=confirm("确定要禁封'"+a+"'吗?");
// 				  layer.confirm('纳尼？', {
// 					  title: "操作提示",
// 					  icon: 0,
// 					  btn: ['按钮一', '按钮二', '按钮三'] //可以无限个按钮
// 					  ,btn3: function(index, layero){
// 					    //按钮【按钮三】的回调
// 					    return true;
// 					  }
// 					}, function(index, layero){
// 						return false;
// 					  //按钮【按钮一】的回调
// 					}, function(index){
// 						return false;
// 					  //按钮【按钮二】的回调
// 					});
//  				  if(z){
// 					layer.alert("禁封成功！");
// 				    return true;
// 				  }else{
// 				    return false;
// 				  } 
				  var a = document.getElementById("id"+st).value; 
				  layer.confirm("确定要封禁吗？",{
					    btn2: function(index, layero){
					        //按钮【按钮二】的回调
					        return true;
					    }
					},
					function(index, layero){
					  //按钮【按钮一】的回调
					  window.location.replace('/Volunteer/DeleVolunteer?id='+a)
					  return true;
					}
					);


			};
// 			function check(st){
// 				layer.open({
// 					  title: '在线调试',
// 					  btn:['确定','取消']
// 					  ,content: '配置各种参数，试试效果'
// 					});  
// 				if(layer.open){
// 					layer.alert("禁封成功！");
// 				    return true;
// 				  }else{
// 				    return false;
// 				  } 
// 			};

			
		</script>
		<script>
			var _hmt = _hmt || [];
			(function() {
				var hm = document.createElement("script");
				hm.src = "https://hm.baidu.com/hm.js?d214947968792b839fd669a4decaaffc";
				var s = document.getElementsByTagName("script")[0];
				s.parentNode.insertBefore(hm, s);
			})();

            layui.use(['laydate','form'], function(){
            });
		</script>
            
	</body>
</html>




